import { reqDetail } from '@/api'

const state = {
  detailList:{}
}
const mutations = {
  GETDETAILLIST(state,detailList){
    state.detailList = detailList
  }
}
const actions = {
  async getDetailInfo({commit}){
    const res = await reqDetail()
    if(res.code == 200){
      commit('GETDETAILLIST',res.data[0])
    }else{
      return Promise.reject()
    }
  }
}

export default{
  state,
  mutations,
  actions
}